package src;
import javax.swing.JOptionPane;
public class main {

	public static void main(String[] args) {
		
		
		String palabra = (JOptionPane.showInputDialog("ingrese la palabra")).trim();
		char[] palabraChar = palabra.toCharArray();
		
		int cvocals=0, ccons=0;
		char letraux ='0';
		
		boolean valida=true, vocal= false;
		
		for(int i = 0 ; i<palabraChar.length ; i++){
			
			if (cvocals==3){
				valida=false;
			}
			if (ccons==3){
				valida=false;
			}
			
			if (palabraChar[i]=='a'||palabraChar[i]=='e'||palabraChar[i]=='i'||palabraChar[i]=='o'||palabraChar[i]=='u'){
				cvocals++;
				ccons=0;
				vocal= true;
				
			}
			if (palabraChar[i]!='a'&& palabraChar[i]!='e'&&palabraChar[i]!='i'&&palabraChar[i]!='o'&&palabraChar[i]!='u'){
				ccons++;
				cvocals=0;
				
			}
		
			
			if (palabraChar[i]==letraux){
				if (palabraChar[i]!='e' && palabraChar[i]!='o'){
					valida=false;
				}
			}
			
			letraux=palabraChar[i];
			
		}
		
	
		if (vocal == false){
			valida = false;
		}
	
	}

}
